﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Monter : MonoBehaviour
{
    [SerializeField]
    private float maxHp = 3;//最大血量
    private float hp;

    private void Start()
    {
        hp = maxHp;
    }

    //受伤
    public void GetHurt(int value)
    {
        hp -= value;
        if (hp <= 0)
        {
            Destroy(this.gameObject);
            EnemyCreater.instance.monsterList.Remove(this.transform);
        }
    }
}